<?php
Route::group(['prefix' => 'crm', 'namespace' => 'Crm', 'as' => 'crm.'], function () {

    /**
     * 文章管理
     */
    Route::group(['prefix' => 'article'], function () {

        //改变属性
        Route::patch('change_attr', 'ArticleController@change_attr')->name('article.change_attr');
        //多选删除
        Route::delete('delete_all', 'ArticleController@delete_all')->name('article.delete_all');
    });
    Route::resource('article', 'ArticleController');


    /**
     * 栏目管理
     */
    Route::group(['prefix' => 'category'], function () {
        //改变属性
        Route::patch('change_attr', 'CategoryController@change_attr')->name('category.change_attr');
        //排序
        Route::patch('sort_order', 'CategoryController@sort_order')->name('category.sort_order');
    });
    Route::resource('category', 'CategoryController');

    //友情链接路由
    Route::group(['prefix' => 'links'], function () {
        //多选删除
        Route::post('delete_all', 'LinkController@delete_all')->name('links.delete_all');
    });
    Route::resource('links', 'LinkController');
    Route::get('vue_links', function () {
        return view('admin.crm.link.index');
    })->name('vue_links');

});